﻿using System.Net;

namespace ZerAx.Net
{
    public static class IPEndPointExtension
    {
        public static IPEndPoint ToIPEndPoint(this string ipAddressAndPort)
        {
            var t = ipAddressAndPort.Trim().Split(':');
            return new IPEndPoint(IPAddress.Parse(t[0]), int.Parse(t[1]));
        }
    }
}
